package com.young.trigger.event;

import com.young.core.enums.LockTypeEnum;
import org.springframework.context.ApplicationEvent;

/**
 * @description：
 * @author: yangyahui01
 * @date: 11/28/24 3:49 PM
 */
public class BrokerEvent extends ApplicationEvent {

    //操作者
    private String operator;

    public BrokerEvent(Object source) {
        this(source, null);
    }

    public BrokerEvent(Object source, String operator) {
        super(source);
        this.operator = operator;
    }

    public String getOperator() {
        return operator;
    }

    /**
     * The object on which the Event initially occurred.
     *
     * @return The object on which the Event initially occurred.
     */
    @Override
    public LockTypeEnum getSource() {
        return (LockTypeEnum)super.getSource();
    }
}
